package highlighter.ast.impl;

import highlighter.ast.IASTNode;
import highlighter.visitor.IASTVisitor;

public class ArithmeticExpr implements IASTNode{

	private int operation;
	private ArithmeticExpr expr;
	private Factor factor;

	public ArithmeticExpr(Factor factor) {
		this.factor = factor;
	}

	public ArithmeticExpr(ArithmeticExpr expr, int operation, Factor factor) {
		this.expr = expr;
		this.operation = operation;
		this.factor = factor;
	}

	public int getOperation() {
		return operation;
	}

	public ArithmeticExpr getLhs() {
		return expr;
	}

	public Factor getFactor() {
		return factor;
	}

	@Override
	public Object accept(IASTVisitor visitor) {		
		return visitor.visit(this);
	}

}
